% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_brms.R
\name{fit_brms}
\alias{fit_brms}
\title{Fit a binary model for MRP}
\usage{
fit_brms(
  .formula,
  .data,
  name_ones_as = "yes",
  name_trls_as = "n_response",
  ...
)
}
\arguments{
\item{.formula}{Formula in \verb{binary y ~ (1|x1) + (1|x2)} form.}

\item{.data}{Individual-level dataset}

\item{name_ones_as}{The name for the variable name for the number of successes}

\item{name_trls_as}{The name for the variable name of the number of trials}

\item{...}{
  Arguments passed on to \code{\link[=fit_brms_binomial]{fit_brms_binomial}}
  \describe{
    \item{\code{.prior}}{prior specification that can be interpreted by brms. The default
is a standard normal prior, which is tighter than the brms default but has
shown to have good prior posterior draws}
    \item{\code{.cores}}{Number of cores to uses}
    \item{\code{.chains}}{Number of chains to pass on fit_brms}
    \item{\code{.iter}}{Number of total iterations.}
    \item{\code{.warmup}}{Of the iterations, how much are burn-ins. Defaults to half.}
    \item{\code{verbose}}{Whether to show iteration messages}
    \item{\code{.seed}}{seed for randomization to pass into brm}
    \item{\code{.backend}}{The backend argument of brms. Defaults to \code{"rstan"}, can also
be \code{"cmdstanr"}}
    \item{\code{.threads}}{The number of threads to do within-chain parallelization. Defaults
to not using, which is NULL}
  }}
}
\description{
Internally, it creates a count version of the individual-data via
\code{ccesMRPprep::build_counts} and then runs the regression in \code{fit_brms_binomial}.
}
\examples{
\dontrun{
fit <- fit_brms(response ~ (1|educ) + (1|cd), cces_GA)
}


}
